﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EditAdjustPrice.aspx.cs"
    Inherits="Skyworth.CRM.Web.SalesManagement.EditAdjustPrice" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>编辑价格方案信息</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <%--[if IE]>
     <link href="../themes/css/ieHack.css" rel="stylesheet" type="text/css" />
    <![endif]--%>

    <script src="../javascripts/jquery-1.4.4.min.js" type="text/javascript"></script>

    <script src="../javascripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>

    <script src="../javascripts/jquery.autocomplete.js" type="text/javascript"></script>

    <link href="../themes/default/style.css" rel="stylesheet" type="text/css" />
    <link href="../themes/css/core.css" rel="stylesheet" type="text/css" />
    <link href="../themes/css/pages.css" rel="stylesheet" type="text/css" />
    <link href="../javascripts/My97DatePicker/skin/WdatePicker.css" rel="stylesheet"
        type="text/css" />
    <style type="text/css">
        .red
        {
            color: Red;
            font-weight: bold;
        }
        table
        {
            border-collapse: collapse;
            border-spacing: 0;
            table-layout: fixed;
            width: 100%;
            border: solid 1px #e7e7e7;
        }
        table tr td
        {
            border-bottom: solid 1px #e7e7e7;
            padding: 0px 3px;
            background-color: #EFEFEF;
        }
        td label
        {
            padding: 2px 2px;
        }
        td.left
        {
            border-right: solid 1px #e7e7e7;
            width: 115px;
        }
        td.right
        {
            background: #FFF;
        }
        td.right, td.readOnly
        {
            padding: 5px 3px;
        }
        .content
        {
            overflow: auto;
            border: solid 1px #CCC;
            line-height: 21px;
            background: #FFF;
            padding: 2px;
        }
        select
        {
            width: 185px;
            height: 22px;
        }
    </style>

    <script type="text/javascript">
        function SaveCheck() {
            var objPrice = $("#txtAdjustPrice");
            var price = objPrice.val();
            if (price == "" || price.length <= 0) {
                alert("请输入调价后单价！");
                objPrice.focus();
                return false;
            }
            if (!new RegExp(/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/).test(price)) {
                alert("请输入正确的价格，价格必须是数字型！");
                objPrice.focus();
                return false;
            }

            var objStartDate = $("#txtAStartDate");
            var startTime = objStartDate.val();
            if (startTime == "" || startTime.length <= 0) {
                alert("请输入调价开始日期！");
                objStartDate.focus();
                return false;
            }
            var objEndDate = $("#txtAEndDate");
            var endTime = objEndDate.val();
            if (endTime == "" || endTime.length <= 0) {
                alert("请输入调价结束日期！");
                objEndDate.focus();
                return false;
            }

        }

        $(document).ready(function() {
            $("input[type=text],textarea").addClass("textInput").width(180).focus(function() { $(this).addClass("focus"); }).blur(function() { $(this).removeClass("focus") });
            $("#btnClose").click(function() {
                parent.addWindow.close();
            })
            $("#btnSave").click(function() {
                return SaveCheck();
            })


        })
    </script>

</head>
<body style="text-align: left; background-color: White;">
    <form id="form1" runat="server">
    <div>
        <div style="margin: 2px;">
            <div class="panel">
                <div class="panelHeader">
                    <div class="panelHeaderContent">
                        <h1>
                            价格方案信息</h1>
                    </div>
                </div>
                <div class="panelContent">
                    <div class="content">
                        <table width="100%">
                            <tr>
                                <td class="left">
                                    <label for="txtSchemeName">
                                        方案名称：</label>
                                </td>
                                <td class="right">
                                    <asp:Label ID="txtSchemeName" runat="server"></asp:Label>
                                </td>
                                <td class="left">
                                    <label for="txtSchemeCode">
                                        方案编码：</label>
                                </td>
                                <td class="right">
                                    <asp:Label ID="txtSchemeCode" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td class="left">
                                    <label for="txtProductName">
                                        对应产品：</label>
                                </td>
                                <td class="right">
                                    <asp:Label ID="txtProductName" runat="server"></asp:Label>
                                </td>
                                <td class="left">
                                    <label for="ddlPriceType">
                                        价格类型：</label>
                                </td>
                                <td class="right">
                                    <asp:Label ID="ddlPriceType" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td class="left">
                                    不含税单价：
                                </td>
                                <td class="right">
                                    <asp:Label ID="txtPrice" runat="server" CssClass="disabled"></asp:Label>
                                </td>
                                <td class="left">
                                    <label for="txtTaxRatio">
                                        税率：</label>
                                </td>
                                <td class="right">
                                    <asp:Label ID="txtTaxRatio" runat="server" CssClass="disabled"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td class="left">
                                    <label for="txtTaxPrice">
                                        含税单价：</label>
                                </td>
                                <td class="right">
                                    <asp:Label ID="txtTaxPrice" runat="server" CssClass="disabled"></asp:Label>
                                </td>
                                <td class="left">
                                    <label for="txtUnit">
                                        单位：</label>
                                </td>
                                <td class="right">
                                    <asp:Label ID="txtUnit" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td class="left">
                                    <label for="txtStartDate">
                                        开始日期：</label>
                                </td>
                                <td class="right">
                                    <asp:Label ID="txtStartDate" runat="server"></asp:Label>
                                </td>
                                <td class="left">
                                    <label for="txtEndDate">
                                        结束日期：</label>
                                </td>
                                <td class="right">
                                    <asp:Label ID="txtEndDate" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td class="left">
                                    <label for="ddlSpecialType">
                                        计入返利：</label>
                                </td>
                                <td class="right">
                                    <asp:Label ID="ddlSpecialType" runat="server"></asp:Label>
                                </td>
                                <td class="left">
                                    <label for="txtAdjustCode">
                                        调价单号：</label>
                                </td>
                                <td class="right">
                                    <asp:TextBox ID="txtAdjustCode" runat="server" CssClass="disabled"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="left">
                                    <label for="txtAdjustPrice">
                                        调价后不含税单价：</label>
                                </td>
                                <td class="right">
                                    <asp:TextBox ID="txtAdjustPrice" runat="server"></asp:TextBox><em class="red">*</em>
                                </td>
                                <td class="left">
                                    <label for="txtTaxAdjustPrice">
                                        调价后含税单价：</label>
                                </td>
                                <td class="right">
                                    <asp:TextBox ID="txtTaxAdjustPrice" runat="server"></asp:TextBox><em class="red">*</em>
                                </td>
                            </tr>
                            <tr>
                                <td class="left">
                                    <label for="txtAStartDate">
                                        调价开始日期：</label>
                                </td>
                                <td class="right">
                                    <asp:TextBox ID="txtAStartDate" runat="server" onClick="WdatePicker({skin:'ext',maxDate:'#F{$dp.$D(\'txtAEndDate\')}'})"></asp:TextBox><em
                                        class="red">*</em>
                                </td>
                                <td class="left">
                                    <label for="txtAEndDate">
                                        调价结束日期：</label>
                                </td>
                                <td class="right">
                                    <asp:TextBox ID="txtAEndDate" runat="server" onClick="WdatePicker({skin:'ext',minDate:'#F{$dp.$D(\'txtAStartDate\')}'})"></asp:TextBox><em
                                        class="red">*</em>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4" class="readOnly" style="padding-right: 12px; background: url('../themes/default/images/grid/grid.png') repeat scroll 0 0">
                                    <a title="清空" href="javascript:void(0)" class="button" style="float: left" id="btnClose">
                                        <span>关闭</span></a>
                                    <div class="button" style="float: right; margin-right: 5px;">
                                        <div class="buttonContent">
                                            <asp:Button ID="btnSave" runat="server" Text="保存" CssClass="serverButton" OnClick="btnSave_Click" />
                                        </div>
                                    </div>
                                    <div style="clear: both; float: none; display: none;">
                                        <asp:HiddenField ID="txtProductId" runat="server" />
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="panelFooter">
                    <div class="panelFooterContent">
                    </div>
                </div>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
